]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
notificationDaemon: Avoid access to undefined property
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 13 Jun 2017 04:49:07 +0000 (06:49 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 13 Jul 2017 15:23:54 +0000 (17:23 +0200)
Avoid a warning when assigning from an undefined property by making
sure to pass a proper null value instead.

https://bugzilla.gnome.org/show_bug.cgi?id=781471

js/ui/notificationDaemon.js

index 315bfdb175d0f214fb91f9e13ef37e8d370e4346..c8cba607b8fcb22874fb21441659bf919d7d7608 100644 (file)
@@ -186,7 +186,8 @@ const FdoNotificationDaemon = new Lang.Class({
             return source;
         }
 
-        source = new FdoNotificationDaemonSource(title, pid, sender, ndata ? ndata.hints['desktop-entry'] : null);
+        let appId = ndata ? ndata.hints['desktop-entry'] || null : null;
+        source = new FdoNotificationDaemonSource(title, pid, sender, appId);
 
         this._sources.push(source);
         source.connect('destroy', Lang.bind(this, function() {